/*
 * Copyright© 2003-2019 浙江汇信科技有限公司, All Rights Reserved. 
 */
package com.icinfo.cloud.provider.punish.execute.controller;

import com.icinfo.cloud.provider.punish.execute.dto.ExecuteFlowRecordRequest;
import com.icinfo.cloud.provider.punish.execute.dto.ExecuteFlowRecordVo;
import com.icinfo.cloud.provider.punish.execute.service.IExecuteFlowRecordService;
import com.icinfo.framework.common.web.Result;
import com.icinfo.framework.core.web.BaseController;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 描述: 裁执分离登记流程记录表 execute_flow_record 对应的Controller类.<br>
 *
 * @author framework generator
 * @date 2022年08月26日
 */
@RestController
@RequestMapping("/punish/execute/flowrecord")
public class ExecuteFlowRecordController extends BaseController {
    /**
     * 日志记录器
     */
    private static final Logger logger = LoggerFactory.getLogger(ExecuteFlowRecordController.class);

    @Autowired
    private IExecuteFlowRecordService executeFlowRecordService;


    /**
     * 查询流转日志
     * @author wuzhihui
     * @date 2022/8/25
     * @param flowRecordDto
     * @return {@link Result <  List < ExecuteFlowRecordVo>>}
     */
    @PostMapping(value = "/getFlowRecord")
    public Result<List<ExecuteFlowRecordVo>> getFlowRecord(@RequestBody @Validated ExecuteFlowRecordRequest flowRecordDto) {
        List<ExecuteFlowRecordVo> flowRecordVos=executeFlowRecordService.getFlowRecordVoList(flowRecordDto);
        return Result.success(flowRecordVos);
    }
}